package top.dfghhj.chapter01;

/**
 * @Author: feifeng
 * @Description: young gc
 * @Date: 2021/4/8 9:18
 */
public class JvmTest {

    /**
     * JVM 参数:
     * -XX:NewSize=5242880 -XX:MaxNewSize=5242880 -XX:InitialHeapSize=10485760 -XX:MaxHeapSize=10485760 -XX:SurvivorRatio=8 -XX:PretenureSizeThreshold=10485760 -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Xloggc:gc.log
     *
     * 解释 gc日志中 Metaspace 和 class space
     *    https://www.jianshu.com/p/cd34d6f3b5b4
     *
     * @param args
     */
    public static void main(String[] args) {
        byte[] array1 = new byte[1024 * 1024];
        array1 = new byte[1024 * 1024];
        array1 = new byte[1024 * 1024];
        array1 = null;

        byte[] array2 = new byte[2 * 1024 * 1024];
    }

}
